<template>
  <div id="use-help-page">
    <div class="page-title page-title-white" :style="{top:(this.getSafeArea().top-4)+'px'}">
      <div id="back-button" @click="$router.push('/MemberHome')">
        <i href="javascript:void(0)" class="el-icon-arrow-left"></i>
      </div>
      <span>使用帮助</span>
    </div>

    <div class="button-box" style="position: relative;"
    :style="{
      top:this.getSafeArea().top+'px'
    }">
      <el-button size="medium" plain type="danger" class="button" v-for="(item,index) in typeArr" :key="index" v-text="item.name" :class="currType===item.type?'curr':''" @click="changeType(item)"></el-button>
    </div>

    <div class="content-box" style="position: relative;"
         :style="{
      top:this.getSafeArea().top-5+'px'
    }">
      <div v-html="content"></div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'UseHelp',
  data:function () {
    return {
      currType:'',
      content:'',
      typeArr:[
        {
          type:'xianshimiaosha',
          name:'限时秒杀',
          content:'限时秒杀就是在每周的规定几天内，讲平台内做活动的商家全部聚集在一块进行商品打折处理'
        },
        {
          type:'youhuituangou',
          name:'优惠团购',
          content:'平台将能够多人购买的商品进行降价处理。。。'
        },
        {
          type:'score',
          name:'积分',
          content:'积分是用户在平台进行操作时候，平台用于答谢回馈用户给与的奖励，积分可以在购买商品时候进行抵扣处理<br>&nbsp;&nbsp;<b>获取方式</b>:<br>' +
            '&nbsp;&nbsp;&nbsp;&nbsp;在平台内可通过【每日签到】获取，一个月内前7次签到会有额外奖励<br>' +
            '&nbsp;&nbsp;&nbsp;&nbsp;在平台完成订单获得，每1元商品获得1个积分<br>' +
            '&nbsp;&nbsp;&nbsp;&nbsp;Vip续费时候也能获取到对应积分<br>' +
            '&nbsp;&nbsp;&nbsp;&nbsp;Vip用户在进行【每日签到】【完成订单】时候会额外增加响应积分<br>' +
            '&nbsp;&nbsp;<b>用途</b>:<br>' +
            '&nbsp;&nbsp;&nbsp;&nbsp;平台内有众多积分兑换商品，用户在攒够一定的积分后可在积分商城进行兑换'
        },
      ]
    }
  },
  mounted () {
    this.changeType({
      type:'xianshimiaosha',
      name:'限时秒杀',
      content:'限时秒杀就是在每周的规定几天内，将平台内做活动的商家全部聚集在一块进行商品打折处理'
    })
  },
  methods:{
    changeType:function (value) {
      this.currType=value.type
      this.content=value.content
    }
  }
}
</script>

<style scoped>

</style>
